//
//  PreviewLocalFileHelper.m
//  ERP
//
//  Created by goldeney on 15/3/13.
//  Copyright (c) 2015年 ShangHai Goldeneye Techonology Co.,Ltd. All rights reserved.
//

#import "PreviewLocalFileHelper.h"
#import "GEQLPreviewController.h"

@interface PreviewLocalFileHelper()

@property(nonatomic,strong) NSString *filePath;

@end


@implementation PreviewLocalFileHelper

static PreviewLocalFileHelper *previewLocalController;

+ (id)instantiation
{
    if (!previewLocalController)
        previewLocalController = [[PreviewLocalFileHelper alloc] init];
    return previewLocalController;
}

- (void)previewViewController:(UIViewController*)viewController localFile:(NSString*)filePath
{
    self.filePath = filePath;
    
    GEQLPreviewController *newViewController = [[GEQLPreviewController alloc] initWithPathString:self.filePath];
    [viewController presentViewController:newViewController animated:YES completion:nil];
}

@end
